<?php
session_start();
include ("../db/dbcontroller.php");
include ("helper_functions.php");
include ("header.php");
echo "<center><h3> --Ressource Buildings-- </h3></center>";


?>

<table width="700px" border="1" cellspacing="0" cellpadding="4" high="600px">
<tr><td colspan="5"><h3>Плантации</h3></td></tr>
<tr><td><b>Эмблема</b></td><td><b>Название здания</b></td><td><b>Актуальный Уровень</b></td><td><b>Статус</b></td><td><b>Действие</b></td></tr>




<?php 
//if(mysqli_num_rows(mysqli_query($dbc, "SELECT town_hall FROM peace_buildings WHERE townid='$townid'"))){
//	
//}
$goldplant = mysqli_query($dbc, "SELECT goldplant FROM resource_buildings WHERE townid='$townid'");
$goldplant = mysqli_fetch_row($goldplant);
$goldplant = $goldplant[0];
echo "<tr><td>image</td><td>Goldplant</td><td>Уровень: ".$goldplant."</tr>";

$query = mysqli_query($dbc, "SELECT stoneplant FROM resource_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Stoneplant</td><td>Уровень: ".$query."</tr>";

$query = mysqli_query($dbc, "SELECT woodplant FROM resource_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Woodplant</td><td>Уровень: ".$query."</tr>";

$query = mysqli_query($dbc, "SELECT metalplant FROM resource_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Metalplant</td><td>Уровень: ".$query."</tr>";

$query = mysqli_query($dbc, "SELECT lager FROM resource_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Lager</td><td>Уровень: ".$query."</tr>";

$query = mysqli_query($dbc, "SELECT market FROM resource_buildings WHERE townid='$townid'");
$query = mysqli_fetch_row($query);
$query = $query[0];
echo "<tr><td>image</td><td>Market</td><td>Уровень: ".$query."</tr>";


?>

</table>

<?php
include ("footer.php"); 